package net.qiqb.rabbitmq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
import org.springframework.core.env.Environment;

public class QueueNameGenerator {

    private ApplicationContext applicationContext;

    @Value("${project.name}")
    private String projectName;

    @Autowired
    public void setApplicationContext(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }

    public String generateQueueName() {
        return "domain_event." + projectName;
    }
}
